package com.zrgj.front.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.zrgj.common.response.BaseResponse;
import com.zrgj.common.response.StatusCodeEnum;
import com.zrgj.domain.Primary;
import com.zrgj.manager.service.IPrimaryService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class PrimaryController {
    @Reference
    private IPrimaryService primaryService;

    @RequestMapping("/getPrimary")
    public BaseResponse getPrimary(){
        List<Primary> primaries = primaryService.selectPrimaryList();

        return new BaseResponse<>(StatusCodeEnum.SUCCESS,primaries);
    }

}
